#include<bits/stdc++.h>

using namespace std;

int main() {
    //1 2 + 3  4 + *
    //21.00
    string exp = "1 2 + 3 4 + *";
    stack<double> st;
    istringstream iss(exp);
    string tok;
    while (iss >> tok) {
        istringstream iss2(tok);
        double x;
        if (iss2 >> x) {
            st.push(x);
        } else {
            double b = st.top();
            st.pop();
            double a = st.top();
            st.pop();
            double c = 0;
            switch (tok[0]) {
                case '+':
                    c = a + b;
                    break;
                case '-':
                    c = a - b;
                    break;
                case '*':
                    c = a * b;
                    break;
                case '/':
                    c = a / b;
                    break;
                default:
                    break;
            }
            st.push(c);
        }
    }
    cout << fixed << setprecision(2) << st.top() << endl;

}


